import { IsNumber, IsOptional, Max, Min } from "class-validator";

class Common {
    @Max(999, {message : '实际支付金额不能大于999'})
    @Min(0, {message : '实际支付金额不能小于0'})
    @IsNumber({allowNaN : false}, {message : '请填写正确的金额'})
    amount:string;
    
    @Max(999, {message : '实际支付金额不能大于999'})
    @Min(0, {message : '实际支付金额不能小于0'})
    @IsNumber({allowNaN : false}, {message : '请填写正确的金额'})
    @IsOptional()
    payAmount:string;
}

export class AddDto extends Common {
    
}

export class EditDto extends Common {
    
}